﻿<UserControl x:Class="MyLib.Control.Calendar"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    d:DesignHeight="480" d:DesignWidth="480" xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit" Loaded="UserControl_Loaded" xmlns:my="clr-namespace:MyLib.Control">
    <UserControl.OpacityMask>
        <ImageBrush />
    </UserControl.OpacityMask>
    <Border Name="border">
        <Grid x:Name="LayoutRoot">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition Width="*" />
                <ColumnDefinition Width="Auto" />
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition Height="50" />
                <RowDefinition Height="*" />
            </Grid.RowDefinitions>
            <Button HorizontalAlignment="Right" Name="buttonNext" Grid.Column="1" BorderThickness="0" Width="61" Click="buttonNext_Click">
                <Button.OpacityMask>
                    <ImageBrush ImageSource="/Calendar;component/appbar.next.rest.png" />
                </Button.OpacityMask>
            </Button>
            <Button HorizontalAlignment="Left" Name="buttonPre" BorderThickness="0" Grid.ColumnSpan="2" Width="60" Click="buttonPre_Click">
                <Button.OpacityMask>
                    <ImageBrush ImageSource="/Calendar;component/appbar.back.rest.png" />
                </Button.OpacityMask>
            </Button>
            <TextBlock Grid.Column="1" Name="textBlockdate" VerticalAlignment="Center" HorizontalAlignment="Center" MinHeight="10" MinWidth="100" FontSize="32" FontWeight="ExtraBold" />
            <toolkit:WrapPanel Grid.ColumnSpan="3" Grid.Row="1" Name="wpPool" MinHeight="120" MinWidth="140" Margin="10,20,10,0" ManipulationCompleted="wpPool_ManipulationCompleted" ManipulationDelta="wpPool_ManipulationDelta" SizeChanged="wpPool_SizeChanged">
                <my:CalendarItem Content="Button" Height="42" x:Name="calendarItem1" Width="103" Click="SelectDate"/>
            </toolkit:WrapPanel>
        </Grid>
    </Border>
</UserControl>
